<cpanel include="../../../config.php">

<?

/***************************************************************************
 *                                 file_show.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../../';
$page_title = "Show File";
include $root_path.'common.php';
include $root_path.'page_header.php';

$template->set_filenames(array(
	'body' => $root_path.$template_path.'files/manager/file_show.tpl')
);

$filename = <<<EOFpacman
<cpanel print="$FORM{'file'}">
EOFpacman;

$directory = <<<EOFpacman
<cpanel print="$FORM{'dir'}">
EOFpacman;

$output = <<<EOFpacman
<cpanel Fileman="viewfile($FORM{'dir'},$FORM{'file'})">
EOFpacman;

$temp = explode('<br>', $output);
$temp2 = explode("\r", $temp[1]);
$description = $temp2[0];

$file = substr($output, (strpos($output, '<hr>') + 4));

$template->assign_vars(array(
	'FILE_CONTENTS' => $file,
	'FILENAME' => $filename,
	'DIRECTORY' => $directory,
	'DESCRIPTION' => $description,
));


//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>

